#ifndef __POLYGONS_H__
#define __POLYGONS_H__
/////////////////
//include
/////////////////
#include"../CXBurst/Array.h"
#include"Triangle.h"

/////////////////
//const
/////////////////

/////////////////
//class
/////////////////
class Triangle;
class DeviceContext;
class Polygons 
{
public:
	Polygons(Array<Triangle*> polygons = Array<Triangle*>());
	~Polygons();
	TriCollInfo GetCollisionLine(const Vector3D& start,const Vector3D& end,const Vector3D& offset_pos = Vector3D(),const Matrix& rot_mat = Matrix(),float size = 1);
	CollInfo GetTriSpheres(Sphere* sphere);
	int GetPolygonNum()const{return polygons.GetSize();};
	void Draw(DeviceContext* device_context,Vector3D offset_pos);
	Triangle* operator[](const int& num){return polygons[num];}
	Triangle* At(const int& num){return polygons[num];}
private:
	Array<Triangle*> polygons;
	Array<Sphere> spheres;
};
#endif __POLYGONS_H__
